package com.domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 账单表
 *
 * @TableName bill
 */
@Data
public class Bill implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 账单id
     */
    private Integer id;

    /**
     * 订单id
     */
    private Integer indentId;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 账单标题
     */
    private String title;

    /**
     * 明细数字
     */
    private BigDecimal sum;

    /**
     * 剩余金额
     */
    private BigDecimal balance;

    /**
     * 创建时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

}